define(function (require){
  var $ = require('zepto'), lib = require('lib');
  lib = new lib();
  $(document).on("tap", ".ui-personal-body-c > li", function(){
    location.href = $(this).attr('data-href');
  });
  
  lib.ajx(lib.getReq().ser + 'member/getMemberInfo.action', {}, function(data){
    if(data.infocode === "0"){
      $(".ui-personal-body-header").html(`<header>
        <a href="/home/personal.html"><img src="${data.info.headPic ? lib.getReq().imgPath + data.info.headPic : '/images/V10.png'}"></a>
      </header>
      <a href="/home/personal.html">${data.info.nickname}<br><span>手机号:${data.info.loginName}</span></a>`);
    }else{
      $(".ui-personal-body-header").html(`<header>
        <a href="/login.html"><img src="/images/VI0.png"></a>
      </header>
      <a href="/login.html?backUrl=${lib.getBackUrl()}" style="line-height: 2rem">去登录</a>`);
    }
  }, function(){
    console.log('网络延迟，请稍后再试');
  });
});